import request from '@/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/blade-visitplanrecord/visitPlanRecord/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}
export const getLists = (current, size, params) => {
  return request({
    url: '/blade-visitplanrecord/visitPlanRecord/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getDetail = (id) => {
  return request({
    url: '/blade-visitplanrecord/visitPlanRecord/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const remove = (ids) => {
  return request({
    url: '/blade-visitplanrecord/visitPlanRecord/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/blade-visitplanrecord/visitPlanRecord/submit',
    method: 'post',
    data: row
  })
}

export const submitWithDays = (row) => {
  return request({
    url: '/blade-visitplanrecord/visitPlanRecord/submitWithDays',
    method: 'post',
    data: row
  })
}


export const getNoticeContent = (day,type) => {
  return request({
    url: '/blade-visitplanrecord/visitPlanRecord/getNoticeContent?date='+day+'&type='+type,
    method: 'get',
  })
}


export const update = (row) => {
  return request({
    url: '/blade-visitplanrecord/visitPlanRecord/submit',
    method: 'post',
    data: row
  })
}

export const submitWithPlan = (planDate,planId,caseUserId,trial) => {
  return request({
    url: '/blade-visitplanrecord/visitPlanRecord/submitWithPlan',
    method: 'post',
    params: {
      planDate,
      planId,
      caseUserId,
      trial
    }
  })
}

export const statisticsWithMonth = (trial,month) => {
  return request({
    url: '/blade-visitplanrecord/visitPlanRecord/statisticsWithMonth',
    method: 'post',
    params: {
      trial,
      month,
    }
  })
}

export const listOfDate = (current, size, params) => {
  return request({
    url: '/blade-visitplanrecord/visitPlanRecord/listOfDate',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}
